package bb.lanxing.chat.utils;

import android.content.Context;
import android.content.Intent;

import bb.lanxing.activity.base.WebActivity;

public class IntentUtils {
    public static void gotoWebBrowser(Context context, String url, String title) {
        gotoWebBrowser(context, url, title, false);
    }

    public static void gotoWebBrowser(Context context, String url, String title, boolean share) {
        Intent intent = new Intent(context, WebActivity.class);
        intent.putExtra("web_url", url);
        intent.putExtra("title", title);
        intent.putExtra("can_share", share);
        context.startActivity(intent);
    }

    public static void gotoWebBrowser(Context context, String url, String title, boolean share, String proSource) {
        Intent intent = new Intent(context, WebActivity.class);
        intent.putExtra("web_url", url);
        intent.putExtra("title", title);
        intent.putExtra("can_share", share);
        intent.putExtra("pro_source", proSource);
        context.startActivity(intent);
    }

    public static void gotoWebBrowser(Context context, String url, String title, boolean share, boolean homeBackable) {
        Intent intent = new Intent(context, WebActivity.class);
        intent.putExtra("web_url", url);
        intent.putExtra("title", title);
        intent.putExtra("can_share", share);
        intent.putExtra("homeBackable", homeBackable);
        context.startActivity(intent);
    }
}